package com.xjm.viewservice.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author Panda
 * @create 2022-01-13 12:11
 */
@Configuration
public class RPCConfig {

    /**
     * 表示用 restTemplate 这个工具来做负载均衡
     * @return
     */
    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
